
#ifndef __G3DQUAL__
#define __G3DQUAL__ 1

#include "glodef.h"
#include "grid3d.h"

/* the following constant defines target grid quality.  Nodes with higher
    quality will not be processed for smoothing */
#define QGRID_SMOOTH_THRESHOLD         1e-2

/* Nodes with higher quality will not be processed for untangling */
#define QGRID_UNTANGLE_THRESHOLD         0.05

#ifdef	__cplusplus
extern "C" {
#endif

void init_g3dqual(grid3d_t *grid);
void done_g3dqual(void);

void fork_QGrid(grid3d_t *grid, node_t *nodes, int *can_move);
void QGrid(grid3d_t *grid, node_t *nodes, int *can_move);
/* IMPORTANT NOTE: can_move is NOT a TRUE/FALSE array.
    A node can not be moved if its entry in can_move is negative */

#ifdef	__cplusplus
}
#endif

#endif
